package com.dreamder.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="T_DRD_CATEGORIA")
@SequenceGenerator(name="seqCategoria", sequenceName="SEQ_DRD_CATEGORIA", allocationSize=1)
public class Categoria implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3884219817103509042L;

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seqCategoria")
	@Column(name = "id_categoria")
	private Long id;
	
	@Column(name = "ds_categoria", nullable = false, length = 30)
	private String descricao;
	
	public Categoria() {
	}

	public Categoria(String descricao) {
		this.descricao = descricao;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the descricao
	 */
	public String getDescricao() {
		return descricao;
	}

	/**
	 * @param descricao
	 *            the descricao to set
	 */
	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

}
